// 引入组件
import OrderIndex from '@/components/order/index.vue'
import OrderExpress from '@/components/order/express.vue'
import OrderInfo from '@/components/order/info.vue'
import OrderRefund from '@/components/order/refund.vue'


//子路由列表
const children = [ //子路由
    {
        name: 'OrderIndex',
        path: 'index',
        component: OrderIndex,
        meta:{auth: true},
    },
    {
        // 物流信息界面
        name: 'OrderExpress',
        path: 'express',
        component: OrderExpress,
        meta:{auth: true},
    }, 
    {
        // 订单详情界面
        name: 'OrderInfo',
        path: 'info',
        component: OrderInfo,
        meta:{auth: true},
    },
    {
        // 退货退款界面
        name: 'OrderRefund',
        path: 'refund',
        component: OrderRefund,
        meta:{auth: true},
    },
]

//1级路由的组件
const layout = {
    template: `<router-view></router-view>`
}

// 组装一个客户的路由
export default {
    name: 'order',
    path: '/order', //1级路由
    component: layout, //组件
    children: children
}